﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace sjt_console20200528
{
    class Good
    {
        // 属性
        String goodName; // 产品名字
        int goodGrade; // 满意度

        public Good(string goodName, int goodGrade)
        {
            this.goodName = goodName;
            this.goodGrade = goodGrade;
        }
        

        // getter/setter方法接口
        public string GoodName
        {
            get
            {
                return goodName;
            }

            set
            {
                goodName = value;
            }
        }

        public int GoodGrade
        {
            get
            {
                return goodGrade;
            }

            set
            {
                goodGrade = value;
            }
        }

        // 方法
        public void buyGood()
        {
            Console.WriteLine("购买商品：{0}",GoodName);
        }
    }
}
